home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / graphics / asprite.arc / ASPRITE.DOC next >
Text File  |  1988-08-09  |  9KB  |  200 lines

  1. -----------------------------------------------------------------------------
  2.                 ASPRITE V1.1
  3.                     by
  4.                 Bob Silliker
  5. -----------------------------------------------------------------------------
  6.  
  7. ASPRITE is a program to create A-Line sprites interactively.  The user is
  8. presented with a simple menu driven interface that allows the user to create,
  9. modify and save sprites.  There are menu options to rotate, flip, shift,
  10. insert, delete, clear, invert, paste and copy individual sprites.  The user
  11. also has direct access to the sprite attributes (xhot, yhot, colors etc)
  12. for each sprite.  The program can be used to create sprites for any of the
  13. resolutions and can be executed in any resolution.
  14.  
  15. The program keeps all of the sprites in memory and will handle 512 sprites.
  16. It does not create a backup file of the sprite file when saving so you should
  17. keep copies of critical sprite files yourself.
  18.  
  19. The main reason sprited was written was to make it easy for sprites to be
  20. included in C code.  The program has an option to create C code out of the
  21. sprites that have been defined.  When the C code is compiled the resulting
  22. sprite structures are properly initialized to the values set by the user.
  23.  
  24. The program displays a dialog on the left of the screen that displays the
  25. bcolor, fcolor, mode, xhot and yhot for the current sprite.  The colors and
  26. hot spot position can be changed by clicking on one of the arrows in the
  27. dialog.  (NOTE: the up arrows on the hot spots actually decrease the hot
  28. spot value which moves the hot spot up.  This is a feature not a bug).  The
  29. program also displays the sprite and a blowup of the foreground pixels and
  30. background pixels.  Clicking on a pixel toggles it's color and sets all other
  31. pixels the mouse touches to the new color while the mouse button is held
  32. down.  The Undo menu option will undo one draw operation.
  33.  
  34. There seems to be some confusion around what a sprite structure looks like.
  35. I have seen documentation from Megamax that says the forecolor comes before
  36. the backcolor and the ABACUS Internals book says the backcolor comes before
  37. the forecolor.  I have chosen to go with the ABACUS books definition of the
  38. sprite structure.
  39.  
  40. When a C  file is created, code is included that defines the sprite structure.
  41. If the sprite structure has not been defined then my structure will be used.
  42.  
  43. There is also some confusion around what value to use in the sprite format
  44. field.  The VDI mode seems to work for values of 0 or 1 and the XOR works
  45. for -1.  I have chosen 1 for VDI and -1 for XOR.  These can be changed
  46. when the code is compiled.  Just define what MY_VDI and MY_XOR should be
  47. before the compiler gets to the code in the sprite C file.  This can be
  48. accomplished by using the -D option of the compiler.  If you don't have
  49. that option then you could include the sprite C file in one of the other C
  50. files you have and define the macros MY_VDI and MY_XOR before the inclusion
  51. of the sprite C file.
  52.  
  53. One final note about the A line colors.  They don't seem to match the default
  54. color indices you get from opening a virtual workstation.  So I took out the
  55. code that displays the foreground and background colors as you change the
  56. bcolor and fcolor indices.
  57.  
  58. -----------------------------------------------------------------------------
  59.  
  60. DESK MENU OPTIONS
  61. -----------------
  62.  
  63. About ASPRITE    - you a get little dialog, nothing fancy, giving me credit
  64.           for this program and allowing anyone to use the program.
  65.  
  66.  
  67.  
  68. FILE MENU OPTIONS
  69. -----------------
  70.  
  71. New             - when you first execute ASPRITE the program allows you to
  72.           play with one sprite.  When you actually want to start
  73.           real work (like saving it) click on this.  The sprite
  74.           that you were playing with will become the first sprite.
  75.  
  76. Open        - open an old asprite file for updating.  The extention for
  77.           asprite is ASP.  The program stores a signature at the
  78.           start of the file and will complain if it doesn't exist.
  79.           If everything is ok the file will be read in and the first
  80.           sprite in the file will be displayed.
  81.  
  82. Read        - read the asprite file.  The sprites in the file selected
  83.           will be inserted at the current sprite location.
  84.  
  85. Create C    - create a C file of the sprites.  The program will give
  86.           you a file selector dialog.  Select the file you want to
  87.           create the C source in.  If the file exists then the program
  88.           will prompt to over-write.
  89.  
  90. Save        - save the file and do not exit the program.  This menu
  91.           option will only be enabled if you used 'Open' or you
  92.           have executed a Save As.
  93.  
  94. Save As        - save the file into a new asprite file. If the file exists
  95.           you will be prompted to over-write.
  96.  
  97. Close        - close the sprite file.  If you made changes then the
  98.           program will ask if you want to save it.  If you do not
  99.           have a file yet (new) and you want to save it then it
  100.           will give a file selector dialog (see Save As).
  101.  
  102. Quit        - quit the program.  If you made changes then the program
  103.           will ask if you want to save it (see Close).
  104.  
  105.  
  106.  
  107. SPRITE MENU OPTIONS
  108. -------------------
  109.  
  110. Add        - add a sprite.  A sprite will be added and will become the
  111.           current sprite.  The new sprite is appended to the current
  112.           sprite.  The sprite attributes and sprite contents will be
  113.           cleared.
  114.  
  115. Dup        - duplicate the current sprite.  This is the same as Add
  116.           except the sprite attributes and contents are copied from
  117.           the current sprite.
  118.  
  119. Copy        - copy the current sprite to the sprite buffer.  There is a
  120.           one sprite buffer that can be used to move sprites around.
  121.  
  122. Paste        - copy from the sprite buffer into the current sprite.  The
  123.           old sprite contents are over-written by the buffer sprite.
  124.  
  125. Delete        - delete the current sprite.  All of the sprites after the
  126.           current sprite will be shifted down one sprite.
  127.  
  128.  
  129.  
  130. PRIM MENU OPTIONS
  131. -----------------
  132.  
  133. Backgrnd    - the other prim operations now work on the background sprite.
  134.           This is a toggle that allows the user to either work with
  135.           the background or foreground of the sprite.  Turning this
  136.           on turns off the Both flag below.
  137.  
  138. Both        - the other prim operations now work on both the backgroud
  139.           and foreground of the sprite.  This is useful for many of
  140.           the operations in the prim menu.  Turning this on turns
  141.           off the Backgrnd flag above.
  142.  
  143. Clear        - clear the current sprite attributes and contents.
  144.  
  145. Invert        - change the ones to zeros and the zeros to ones in the sprite.
  146.  
  147. Shift        - shift the sprite.  The user will get a dialog that allows
  148.           shifting of the sprite in four directions.
  149.  
  150. Rot 90        - rotate the sprite 90 degrees clockwise.
  151.  
  152. H flip        - flip the sprite horizontally.
  153.  
  154. V flip        - flip the sprite vertically (make it upside down).
  155.  
  156. Copy        - copy from the foreground to the background of the sprite.
  157.           If the Backgrnd menu option has been selected then it will
  158.           copy from the background to the foreground.
  159.  
  160.  
  161. MISC MENU OPTIONS
  162. -----------------
  163.  
  164. Undo        - Undo the last operation.  This works for all the menu
  165.           options that cause a change to the sprites.  It does not
  166.           work for any of the File options.
  167.  
  168. Outline        - display a box around the actual size sprite.  The default
  169.           for this is to be on.  Sometimes is nice to see the sprite
  170.           without the box around it.
  171.  
  172. Lines        - darken the lines used to draw the sprite pixels.  I think
  173.           that the default for this is to be on for color and off
  174.           for mono.
  175.  
  176. Hot Spot    - display the hot spot on the sprite.  The little 'x' that
  177.           appears in the sprite is the position of the hot spot.
  178.           The position of this spot is controlled by the lower
  179.           portion of the dialog on the left of the screen.  This
  180.           option is selected when the program is first executed.
  181.  
  182. Color        - set the vdi colors using a color palette dialog.  The code
  183.           for this dialog I distributed as a library routine some
  184.           time ago.  I include it in all my programs.  When the
  185.           program terminates the color will be set back as it was
  186.           before the program was executed.
  187.  
  188. -----------------------------------------------------------------